from typing import Optional
from pydantic import BaseModel


class AccountPublic(BaseModel):
    id: int
    username: str


class AccountSubmitted(BaseModel):
    username: str
    password: str


class SetRoleSubmitted(BaseModel):
    username: str
    roleToSet: str = "vip"


class AccountDetail(BaseModel):
    id: Optional[int] = 0
    username: Optional[str] = ""
    token: Optional[str] = ""
    role: Optional[str] = ""
    saved_matrices: Optional[str] = ""
    error: Optional[str] = ""


class ApiResponse(BaseModel):
    status_code: int
    message: str
    data: Optional[AccountDetail] = None


class Equation(BaseModel):
    ctt: str
